/*****************************************************************
Wowengine - v0.1

File: wen_transformation.h
Creation date: 2012-10-15
*****************************************************************/

/****************************************************************/
#ifndef WEN_TRANSFORMATION_H
#define WEN_TRANSFORMATION_H
//----------------------------------------------------------------

#include "graphics/wen_graphicsStructs.h"

#include <d3dx9.h>

namespace wen
{
//----------------------------------------------------------------

class Transformation
{
public:

	Transformation();
	virtual ~Transformation();

	//Matrix Stuff
	void SetMatrixMode(MatrixMode matrixMode);
	MatrixMode GetMatrixMode() const;
	void LoadIdentity();

	//Transformations
	void Translate(float fPosX, float fPosY, float fPosZ);
	void Rotate(float fAngleX, float fAngleY, float fAngleZ);
	void Scale(float fWidth, float fHeight, float fDepth);

	const D3DXMATRIX& GetTranslationMatrix() const;
	const D3DXMATRIX& GetRotationMatrix() const;
	const D3DXMATRIX& GetScaleMatrix() const;

	const D3DXMATRIX& GetTotalTransformMatrix() const;

	void CalculateAndSetMatrixBetweenTransforms(const Transformation& kTransformationOne, const Transformation& kTransformationTwo);

	void SetTotalTransformMatrixFromArray(const float* theArray);


private:

	D3DXMATRIX m_totalMatrix;

	D3DXMATRIX m_rotationMatrix;
	D3DXMATRIX m_translationMatrix;
	D3DXMATRIX m_scaleMatrix;

	MatrixMode m_eMatrixMode;

};
//----------------------------------------------------------------
} // end namespace
//----------------------------------------------------------------
#endif // WEN_TRANSFORMATION_H
//----------------------------------------------------------------